c6daeb46f3e5db483dd7cd58cc90542102a3f93d,test/src/main/java/org/vertexium/test/GraphTestBase.java,GraphTestBase,queryGraphQueryWithGeohashAggregation,#String#number#Authorizations#,4966

Before Change



    private Map<String, Long> queryGraphQueryWithGeohashAggregation(String propertyName, int precision, Authorizations authorizations) {
        Query q = graph.query(authorizations).limit(0);
        if (!(q instanceof GraphQueryWithGeohashAggregation)) {
            LOGGER.warn("%s unsupported", GraphQueryWithGeohashAggregation.class.getName());
            return null;
        }
        q = ((GraphQueryWithGeohashAggregation) q).addGeohashAggregation("geo-count", propertyName, precision);
        return geoHashBucketToMap(((IterableWithGeohashResults) q.vertices()).getGeohashResults("geo-count").getBuckets());
    }

    @Test

After Change


        graph.flush();
    }

    private Map<String, Long> queryGraphQueryWithGeohashAggregation(String propertyName, int precision, Authorizations authorizations) {
        Query q = graph.query(authorizations).limit(0);
        GeohashAggregation agg = new GeohashAggregation("geo-count", propertyName, precision);
        if (!q.isAggregationSupported(agg)) {
            LOGGER.warn("%s unsupported", GeohashAggregation.class.getName());
            return null;
        }
        q.addAggregation(agg);
        return geoHashBucketToMap(q.vertices().getAggregationResult("geo-count", GeohashResult.class).getBuckets());
    }

    @Test